"""
@author: chenzhenhua
@project: auto_jift
@file: file_class.py
@time: 2021/6/23 0023 15:27
@desc:
"""

import pandas as pd
from auto_jift.excel.exam import FileClass

if __name__ == "__main__":
    data_config = pd.read_excel('data/江西服装学院机房整体情况一览表（最新）.xls', sheet_name='Sheet2')
    addr_code = data_config['地点'].values
    ever_num_office = data_config['office']
    ever_num_web = data_config['网页设计']

    # office高级应用
    dir = 'data/office高级应用班级名单汇总'
    subject = 'office高级应用'
    path_index = [10, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11]

    # 单表-------------------------------------------------
    path_origin, path_new = 'data/excel模板/office高级应用设计模板_单表.xlsx', 'data/excel导出数据/office高级应用/office高级应用_现班级_单表.xlsx'
    exam = FileClass(dir, subject, ever_num_office, path_index, addr_code)
    exam.write_to_excel(path_origin, path_new)

    # 网页设计
    dir = 'data/网页设计班级名单汇总'
    subject = '网页设计'
    path_index = [10, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11]

    # 单表-------------------------------------------------
    path_origin, path_new = 'data/excel模板/网页设计模板_单表.xlsx', 'data/excel导出数据/网页设计/网页设计_现班级_单表.xlsx'
    exam = FileClass(dir, subject, ever_num_web, path_index, addr_code)
    exam.write_to_excel(path_origin, path_new)